package com.xuzimian.global.demo.mojo;


import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;

import java.io.File;

/**
 * apache maven plugin 插件开发官方文档地址：http://maven.apache.org/plugin-developers/index.html
 * 尽量去Apache Maven 或者 Github 上寻找合适的插件，而非自己开发插件。
 */
@Mojo(name = "CountProjectMojo", defaultPhase = LifecyclePhase.PROCESS_SOURCES)
public class CountMojo extends AbstractMojo {


    @Parameter(defaultValue = "${project.basedir}",readonly = true)
    private File basidir;


    public void execute() throws MojoExecutionException {
        getLog().info( "Hello, world." );
    }
}
